<%--
  Created by IntelliJ IDEA.
  User: kezs
  Date: 2017/10/16
  Time: 17:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="sider" class="fr">
    <div class="feed-mail">
        <div class="box">
            <ul id="contact-li">
                <li class="qq"><a rel="nofollow" target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=271478726&site=qq&menu=yes" title="QQ呼我">QQ留言</a></li>
                <li class="email"><a rel="nofollow" target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=bwQKAg4GAxwvHh5BDAAC" title="给我写信">给我发邮件</a></li>
                <li class="rss"><a rel="nofollow" target="_blank" href="http://list.qq.com/cgi-bin/qf_invite?id=561e11d58faf9deda60534643c12cd85234f474a1a46adac" title="订阅本站到邮箱">订阅本站到邮箱</a></li>
            </ul>
        </div>

        <div class="gg" style="height: 300px;">
            <p>
                <marquee direction="up" scrollamount="1">
                    曾梦想仗剑走天涯
                    看一看世界的繁华
                    年少的心总有些轻狂
                    如今你四海为家
                    曾让你心疼的姑娘
                    如今已悄然无踪影
                    爱情总让你渴望又感到烦恼
                    曾让你遍体鳞伤
                    Dilililidilililidenda
                    Dilililidilililidada
                    Dilililidilililidada
                    走在勇往直前的路上
                    Dilililidilililidenda
                    Dilililidilililidada
                    Dilililidilililidada
                    有难过也有精彩
                    每一次难过的时候
                    就独自看一看大海
                    总想起身边走在路上的朋友
                    有多少正在疗伤
                    Dilililidilililidenda
                    Dilililidilililidada
                    Dilililidilililidada
                    不知多少孤独的夜晚
                    Dilililidilililidenda
                    Dilililidilililidada
                    Dilililidilililidada
                    从昨夜酒醉醒来
                    每一次难过的时候
                    就独自看一看大海
                    总想起身边走在路上的朋友
                    有多少正在醒来
                    让我们干了这杯酒
                    好男儿胸怀像大海
                    经历了人生百态世间的冷暖
                    这笑容温暖纯真
                    每一次难过的时候
                    就独自看一看大海
                    总想起身边走在路上的朋友
                    有多少正在醒来
                    让我们干了这杯酒
                    好男儿胸怀像大海
                    经历了人生百态世间的冷暖
                    这笑容温暖纯真
                </marquee>

            </p>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div class="con_box htabs_art clearfix">
        <ul class="cooltab_nav sj_nav clearfix">
            <li><a href="#" class="active" title="new_art">推荐</a></li>
            <li><a href="#" title="hot_art">热门</a></li>

        </ul>
        <div id="new_art" class="com_cont">
            <ul id="recommArticleList">

            </ul>
        </div>
        <div id="hot_art" class="com_cont">
            <ul id="hotArticleList">

            </ul>
        </div>

    </div>
    <div class="con_box hot_box">
        <h3>关键字</h3>
        <ul class="tagcloudy" id="ulHotWord">

        </ul>
    </div>
    <div class="con_box hot_box">
        <h3>最近访客</h3>
        <div class="readers clearfix">
            <a rel="nofollow" href="#" title="" target="_blank">
                <img alt='#' src='/static/style/themes/images/nullphoto.jpg' class='avatar avatar-48 photo' height='48' width='48' />
            </a>
            <a rel="nofollow" href="#" title="" target="_blank">
                <img alt='#' src='/static/style/themes/images/nullphoto.jpg' class='avatar avatar-48 photo' height='48' width='48' />
            </a>
            <a rel="nofollow" href="#" title="" target="_blank">
                <img alt='#' src='/static/style/themes/images/nullphoto.jpg' class='avatar avatar-48 photo' height='48' width='48' />
            </a>
            <a rel="nofollow" href="#" title="" target="_blank">
                <img alt='#' src='/static/style/themes/images/nullphoto.jpg' class='avatar avatar-48 photo' height='48' width='48' />
            </a>
        </div>
    </div>
    <div class="con_box hot_box">
        <h3></h3>
        <div class="r_comments">
            <ul id="replyRecently">


            </ul>
            <a href="https://s.click.taobao.com/t?e=m%3D2%26s%3D5rWyKOKJizkcQipKwQzePCperVdZeJviEViQ0P1Vf2kguMN8XjClAme9zOj6m1ZjZidzrQp2Z%2BBuzZ%2FU0Ne%2BRv%2FMphLtHdMVu%2BnGMewYbVpapEYSII%2FMODDVuRn8ddiDsEVVC24eqozO54LQ%2FVw1L9X5LHh3Z8M%2BWS6ALZVeqlk9XUfbPSJC%2F06deTzTIbffYpyF7ku%2BxKgGargQjSAC4C6cUF%2FXAmem">
                <img src="/static/ad_pic/250-250.jpg"/>
            </a>

        </div>
    </div>
    <div id="rollstart"></div>
</div>

<script language="JavaScript">

    function getReplyList() {
        var url = "/replies?articleId=0";
        $.post(url,function (data) {
            if(data != "undefined") {
                for (var i=0;i<data.length;i++){
                    var item = "<li>"+ data[i].userAccount + ":" + data[i].content+"</li>"
                    $("#replyRecently").append(item)
                }
            }

        },"json");
    }
    function getRecommArticleList(recommId,ulObj) {
        var url = "/list/"+recommId;
        $.post(url,function (data) {
            if(data != "undefined") {
                for (var i=0;i<data.length;i++){
                    var item = "<li><a href="+"'/details/"+data[i].id+ "' class='title'>"+data[i].title+"</a></li>"
                    ulObj.append(item)
                }
            }

        },"json");
    }


    function getHotWords() {

        var colors = ["#cc0fcf","#52dbb6","#c91895","#1a6207"];
        var fontsize = ["15.214","12.35","14","13.56"]
        var url = "/hotwords";
        $.post(url,function (data) {
            if (data != "undefined") {
                for (var i=0;i<data.length;i++){
                    var item = "<a href='##link##' class='tag-link-35' title='' style='color:##color##;font-size: 15.##fontsize##px;'>##keyword##</a>";
                    var randomId = Math.round(Math.random()*4);
                    item = item.replace("##color##",colors[randomId]).replace("##fontsize##",fontsize[randomId]).replace("##keyword##",data[i].keyword);
                    if (data[i].articleId != 0) {
                        item = item.replace("##link##","/details/"+data[i].articleId);
                    }else{
                        item = item.replace("##link##","/keyword/"+data[i].keyword);
                    }
                    $("#ulHotWord").append(item)
                }
            }
        },"json")



    }

    $(function() {
       getReplyList();
       getRecommArticleList(2,$("#recommArticleList"));
       getRecommArticleList(3,$("#hotArticleList"));
        getHotWords();
    });

</script>
